using UnityEngine;
using System.Collections;

public class CameraZoom : MonoBehaviour {
	
	public float zoomLevel;
	public float zoomMin;
	public float zoomMax;
	public float zoomSpeed;
	
	// Use this for initialization
	void Start () {
	}
	
	// Update is called once per frame
	void Update () {
		if ((Input.GetKey(KeyCode.KeypadPlus) || Input.GetKey(KeyCode.Equals)) && zoomLevel < zoomMax)
		{
			Camera.main.camera.orthographicSize -= zoomSpeed;
			zoomLevel+= zoomSpeed;
			Debug.Log("Zoom Plus "+zoomLevel+"\n");
		}
		
		if ((Input.GetKey(KeyCode.KeypadMinus) || Input.GetKey(KeyCode.Minus)) && zoomLevel > zoomMin)
		{
			Camera.main.camera.orthographicSize += zoomSpeed;
			zoomLevel-=zoomSpeed;
			Debug.Log("Zoom Minus "+zoomLevel+"\n");
		}
	}
}
